Kwik.Page.include("Kwik.Collections.Hashtable.js");
Kwik.Page.include("Kwik.Data.Command.js");

/**
* Data command collection
* @extends Kwik.Collection.Hashtable
* @requires Kwik.Collection.Hashtable
* @requires Kwik.Data.Command
* @constructor
* @created 12:37 AM 7/29/2009
* @modified 12:37 AM 7/29/2009
*/
Kwik.Data.CommandCollection = function(config)
{
	/** @ignore */
	Kwik.Utility.extend(this, "Kwik.Collections.Hashtable");
	this.__class.push("Kwik.Data.CommandCollection");

	/** Add a command to this collection @type Kwik.Data.Command */
	this.add = function CommandCollection_add(name, command)
	{
		command = command || new Kwik.Data.Command({name: name});
		command.parent = this;
		return this.Kwik$Collections$Hashtable.add(name, command);
	};

	/** Configure this command collection @type Kwik.Data.ParameterCollectionConfig */
	this.configure = function CommandCollection_configure(config)
	{
		config = this.Kwik$Collections$Hashtable.configure(config);
		
		return config;
	};

	/** @ignore */
	this.main = function CommandCollection_main(config)
	{
		if(config){this.configure(config);}
	}; this.main(config);
};